<template>
  <div>
    <span class="iconfont return" @click="up">&#xe61e;</span>
    <topnav v-bind:title="navTitle"></topnav>
     <div class="myset">
       <ul>
         <li v-on:click="changepwd">
           <span>修改密码</span>
           <span class="iconfont">&#xe601;</span>
         </li>
         <li>
           <span>声音提醒</span>
            <el-switch
              v-model="sound"
              active-color="#13ce66"
              inactive-color="#ff4949">
            </el-switch>
           </li>
         <li>
           <span>震动提醒</span>
            <el-switch
              v-model="shake"
              active-color="#13ce66"
              inactive-color="#ff4949">
            </el-switch>
           </li>
         <li>
           <span>版本1.0</span>
           <span style="color:#13ce66">已是最新版本</span>
         </li>
         <li>
            <el-button type="success" class="outbtn" v-on:click="outlogin">退出按钮</el-button>
         </li>
       </ul>
     </div>
  </div>
</template>
<script>
import topnav from '@/components/topnav'
import Router from '../../router'
export default {
  components: {
    topnav
  },
  data () {
    return {
      navTitle: '我的设置',
      sound: '',
      shake: ''
    }
  },
  methods: {
    up () {
      Router.push('/index')
    },
    changepwd () {
      Router.push('/myset/changepwd')
    },
    outlogin () {
      localStorage.setItem('currentUser_name', '')
      Router.push('/')
    }
  }
}
</script>
<style lang="stylus" scoped>
 .return
   position absolute
   margin-top 0.8rem
   margin-left 0.5rem
   color #ffffff
 .myset
   padding 0.2rem
   font-size 0.34rem
   color #000000
  .myset ul li
    display flex
    justify-content space-between
    margin-top 0.2rem
  .outbtn
    width 6.6rem
    font-size 0.36rem
    margin 0.25rem auto 0
</style>
